Skip to content

fix: signatures are now verifiable#15

Merged
duncdrum merged 3 commits into
mainfrom
fix/jwt-compat
Jan 12, 2026
Merged

fix: signatures are now verifiable#15
duncdrum merged 3 commits into
mainfrom
fix/jwt-compat

Conversation

@line-o
Copy link
Copy Markdown
Member

@line-o line-o commented Jan 12, 2026

The return of crypto:hmac#4 cannot be passed to util:base64-encode-url-safe() as that will double-encode the base64 encoded value. A simple translate operation will turn the base64 encoded value into a url-safe one that is suitable for use here.

As a result JWTs are now externally verifiable by other tools as jwt.io's token debugger.

@line-o line-o requested a review from duncdrum January 12, 2026 20:08
Comment thread src/content/jwt.xqm Outdated
Copy link
Copy Markdown
Contributor

@duncdrum duncdrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@line-o you marked exist v7 as experiemental but didn't set continue-on-error . Should this work on exist 7? Can we bump node on ci to current LTS? who knows what happens on 14 its ancient

The return of crypto:hmac#4 cannot be passed to util:base64-encode-url-safe() as that will double-encode the base64 encoded value.
A simple translate operation will turn the base64 encoded value into a url-safe one that is suitable for use here.

As a result JWTs are now externally verifiable by other tools as jwt.io's token debugger.
Since exist@latest cannot pass until the crypto lib is available I marked it as experimental.
The spec does not care but why have extra bytes in memory as this is never read by users directly.
@line-o
Copy link
Copy Markdown
Member Author

line-o commented Jan 12, 2026

@duncdrum continue-on-error is set

jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duncdrum here

@line-o
Copy link
Copy Markdown
Member Author

line-o commented Jan 12, 2026

I think updating all build-tools and building on the latest LTS of node is not in scope for this PR

@duncdrum duncdrum merged commit 2a0ea3a into main Jan 12, 2026
6 of 8 checks passed
@duncdrum duncdrum deleted the fix/jwt-compat branch January 12, 2026 22:13
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants